{% extends "BluehouseappWebBundle:Backend/Admin/layout:layout.html.twig" %}
{% from 'BluehouseappWebBundle:Macros:misc.html.twig'  import pagination %}
{% import 'BluehouseappWebBundle:Macros:buttons.html.twig' as buttons %}

{% block title %}
    禁止IP管理
{% endblock %}

{% block body -%}
{% set entities=banedIPs %}

    <div class="page-header">
        <h2>禁用IP列表  <small></small></h2>
    </div>
    <ol class="breadcrumb clearfix">
        <div class="clearfix">
            <div class="pull-left">
                {{ buttons.create(path('bluehouseapp_banedIPs_create')) }}
            </div>

        </div>
    </ol>

    {{ pagination(entities) }}
    <table class="table  table-striped table-hover table-condensed">
        <thead>
            <tr>
                <th>{{bluehouse_resource_sort('id', '#ID') }}</th>
                <th>Ip</th>
                <th>创建时间</th>
                <th>开始日期</th>
                <th>{{bluehouse_resource_sort('toDate', '结束日期') }}</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
        {% for entity in entities %}
            <tr>
                <td><a href="{{ path('bluehouseapp_banedIPs_show', { 'id': entity.id }) }}">{{ entity.id }}</a></td>
                <td>{{ entity.ip }}</td>
                <td>{{ entity.timestamp|date("Y-m-d H:i") }}</td>
                <td>{{ entity.fromDate|date("Y-m-d H:i") }}</td>
                <td>{{ entity.toDate|date("Y-m-d H:i") }}</td>
                <td>
                <ul>

                    <li>
                        {{ buttons.delete(path('bluehouseapp_banedIPs_delete', {'id': entity.id})) }}
                    </li>
                    <li>

                        {{ buttons.show(path('bluehouseapp_banedIPs_show', {'id': entity.id})) }}
                    </li>
                    <li>
                        {{ buttons.edit(path('bluehouseapp_banedIPs_update', {'id': entity.id})) }}

                    </li>
                </ul>
                </td>
            </tr>
        {% endfor %}
        </tbody>
    </table>
    {{ pagination(entities) }}
    {% endblock %}
